@extends('layouts.tankuang')

@section('content')
        <form name="add_form" id="add_form" action="{{url('admin/rysh/addrysh')}}" method="post" enctype="multipart/form-data">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
            <div id="div_print">
                <h2 class="text-center mg_b36 mg_t25" style="font-weight:bold;">人员审核</h2>

                <table class="table-form table-border w mg-auto">
                    <tbody>
              
                    <tr>
                        <td class="font-bd">上报时间</td>
                        <td colspan="2">
                             <input type="text" name="sbsj"  class="easyui-datetimebox" disabled/>

                        </td>
                        <td rowspan="3" width="160" class="text-center">
                        	<div class="box_bt" style="    top: 2px;">
	                        <span class="img_add"><img src="../../css/icons/edit_add.png">添加核查人照片</span>
	                         <input class="box_file" type="file" name="pic">
	                        </div>
	                    </td>
                        
                    </tr>
                     <tr>
                       <td class="font-bd">县市区、派出所</td>
                        <td colspan="2">
                            <input type="text" class="form-input w" value="{{getValue($units->city,'area','id','name')}}{{getValue($units->area,'area','id','name')}}{{getValue($units->org_id,'area','id','name')}}" disabled>
                        </td> 
                    </tr>
                    <tr>
                        <td class="font-bd">上报单位</td>
                        <td colspan="2"><input type="text" class="form-input w" value="{{$units->name}}" disabled></td>
                    </tr>
                     <tr>
                        <td class="font-bd">上报人</td>
                        <td>
                             <input type="text" class="form-input w easyui-validatebox" value="" name="sbren" data-options="required:true,missingMessage:'上报人不能为空',validateOnCreate:false,validateOnBlur:true">
                        </td>
                        <td class="font-bd">联系电话</td>
                        <td>
                            <input type="text" class="form-input w easyui-validatebox" value="" name="lxfs" data-options="required:true,validType:'phoneAndMobile',missingMessage:'请填写联系电话',invalidMessage:'请输入正确的联系电话',validateOnCreate:false,validateOnBlur:true">
                        </td>
                    </tr>



                     <tr>
                        <td class="font-bd">核查人员姓名</td>
                        <td>
                             <input type="text" class="form-input w easyui-validatebox" value="" name="hcry" data-options="required:true,missingMessage:'核查人员姓名不能为空',validateOnCreate:false,validateOnBlur:true">
                        </td>
                        <td class="font-bd">身份证号</td>
                        <td>
                            <input type="text" class="form-input w easyui-validatebox" value="" name="sfzh" data-options="required:true,validType:'idcard',missingMessage:'身份证号不能为空',invalidMessage:'请输入正确的身份证号',validateOnCreate:false,validateOnBlur:true">
                        </td>
                    </tr>

                    </tbody>
                </table>

            
                <div class="w wbt mg_t25 pd_b20 text-center">
                    <button id="go" type="button" class="easyui-linkbutton dsp" data-options="iconCls:'icon-save'">确定</button>
                    <button type="button" class="easyui-linkbutton dsp" data-options="iconCls:'icon-no'" onclick="$('#adbg').window('close')">关闭</button>
                </div>
            </div>
        </form>

  

        <script>
            $('#go').click(function (){
            	if(!$("#add_form").form('validate')){
					return false;
					}
                var formData = new FormData($( "#add_form" )[0]);
                $.ajax({
                    cache: true,
                    type: "POST",
                    url: "{{url('admin/rysh/addrysh')}}",
                    data: formData,
                    async: false,
                    cache: false,
                    contentType: false,
                    processData: false,
                    success: function(data) {
                        if(data.status == 1){
                            $.messager.alert('信息提示',data.msg,'info');
                            $('#adbg').dialog('close');
                            $('.pagination-load').click();
                        }else {
                            $.messager.alert('信息提示',data.msg,'info');
                        }
                    },
                    error: function(msg) {
                        var json=JSON.parse(msg.responseText);
                        $.each(json, function(index, value) {
                            $.messager.alert('信息提示',value,'info');die;
                        });
                    },
                });
            });
        </script>




@stop